//
// Created by gogoqiu on 2022/2/14.
//

#ifndef RAPIDSVN_CMAKE_PRINTOUT_H
#define RAPIDSVN_CMAKE_PRINTOUT_H

#include <wx/wx.h>
#include <wx/print.h>
#include <wx/printdlg.h>
//#include "wxPrintMain.h"

class wxPrintFrame;
class Printout : public wxPrintout
{
public:
//        Printout();
    explicit Printout(wxPrintFrame* frame, const wxString &title = wxT("My printout")): wxPrintout(title) { m_frame=frame; }
//        virtual ~Printout();
    void GetPageInfo(int *minPage, int *maxPage,int *pageFrom, int *pageTo) override;
    bool HasPage(int pageNum) override;
    virtual void DrawPageOne(wxDC*dc);
    virtual void DrawPageTwo(wxDC *dc);
    bool OnBeginDocument(int startPage, int endPage) override;
    bool OnPrintPage(int page) override;
protected:
private:
    wxPrintFrame *m_frame;
};

#endif //RAPIDSVN_CMAKE_PRINTOUT_H
